package com.rs2hd.content;

import com.rs2hd.event.Event;
import com.rs2hd.model.Player;
import com.rs2hd.model.World;

/**
 * Updates player options.
 *
 * @author Pie
 */
public class OptionsUpdateEvent extends Event {

    /**
     * Creates the event that updates wilderness levels every 500ms.
     */
    public OptionsUpdateEvent() {
        super(500);
    }

    @Override
    public void execute() {
        for (Player p : World.getInstance().getPlayerList()) {
	    if (p.SafeZone()) {
            	p.getActionSender().sendPlayerOption("Trade With", 3, false);
            	p.getActionSender().sendPlayerOption("Follow", 4, false);
	    }
        }
    }
}
